package com.huluobo.a2107mvpimdemo.addGroup.presenter;

import com.hyphenate.chat.EMClient;
import com.hyphenate.chat.EMGroupInfo;
import com.hyphenate.chat.EMGroupOptions;

import java.util.List;

/**
 * 添加群组的协议
 * Created by LC on 2023/9/25.
 */
public interface AddGroupContract {
    interface Presenter {
        //创建群,记得加群的设置,设置为公开加入的群,其他群形式不需要创建
        void createGroup(String groupName, String desc, String[] allMembers, String reason, EMGroupOptions option);

        //从服务器获取所有公开群
        void findGroup(int pageSize, String cursor);

        //加入群
        void joinGroup(String groupId);
    }

    interface View {
        void onCreateGroupSuccess();

        void onCreateGroupFailed(String error);

        void onFindGroupSuccess(List<EMGroupInfo> groupInfos);

        void onFindGroupFailed(String error);

        void onJoinGroupSuccess();

        void onJoinGroupFailed(String error);
    }
}
